#ifndef MUTAGEN_H
#define MUTAGEN_H

#include <QObject>
#include "QPointF"
#include "MainWindow.h"
#include "ContinuousSequencer.h"
#include "extOSCThread.h"
#include "MutaTimer.h"
#include "MutaTransport.h"

class Mutagen : public QObject
{
    Q_OBJECT
public:
    Mutagen(QSemaphore* wait4CleanupDone);
    ~Mutagen();
    QList<ContinuousSequencer*> sequencers;
    void sendOSC(osc::OutboundPacketStream p);
private:
    MainWindow *w;
    ExtOSCThread extOSCThread;
    MutaTimer *timer;
    MutaTimer *frameTimer;
    MutaTransport *transport;
    QSemaphore* wait4CleanupDone;
    int oscthulhuPort;

signals:
    void quitting();
public slots:
    void zoomChanged(float zoom);
    void scrollContents(int dx,int dy);
    void save();
    void load();
    void handleQuit();

    //OSCthulhu
    void connectOSCthulhu();
    void addedMutaEventToScene(MutaEvent* mutaEvent);
    void addedMutaLineToScene(MutaLine* mutaLine);
    void addedMutaCurveToScene(MutaCurve* mutaCurve);
    void addedMutaTendrilToScene(MutaTendril* mutaTendril);
    void addedMutaRepeatToScene(MutaRepeat* mutaRepeat);
};



#endif // MUTAGEN_H
